package com.yunji.framework_template.books.biz.service;

import com.yunji.framework_template.books.orm.persistence.model.BooksAuthor;
import com.yunji.framework_template.books.orm.persistence.mapper.BooksAuthorMapper;
import com.yunji.framework_template.common.web.Page;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import org.apache.ibatis.annotations.Param;

/**
 *
 * Created by fenglibin on 2019/01/24.
 */
@Service
public class BooksAuthorService {

	@Autowired
    private BooksAuthorMapper booksAuthorMapper;
    
    public int deleteByPrimaryKey(Integer id){
        return booksAuthorMapper.deleteByPrimaryKey(id);
    }

    public int insert(BooksAuthor record){
        return booksAuthorMapper.insert(record);
    }

    public int insertSelective(BooksAuthor record){
        return booksAuthorMapper.insertSelective(record);
    }

    public BooksAuthor selectByPrimaryKey(Integer id){
        return booksAuthorMapper.selectByPrimaryKey(id);
    }
    
    public BooksAuthor selectByAuthorName(String authorName){
        return booksAuthorMapper.selectByAuthorName(authorName);
    }

    public int updateByPrimaryKeySelective(BooksAuthor record){
        return booksAuthorMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(BooksAuthor record){
        return booksAuthorMapper.updateByPrimaryKey(record);
    }

    public List<BooksAuthor> selectByCondition(BooksAuthor record){
        return booksAuthorMapper.selectByCondition(record);
    }

    public List<BooksAuthor> selectAll(){
        return booksAuthorMapper.selectAll();
    }

    public List<BooksAuthor> selectByPage(Page<BooksAuthor> page){
        return booksAuthorMapper.selectByPage(page);
    }

    public Integer count(BooksAuthor record){
        return booksAuthorMapper.count(record);
    }

    public int deleteByCondition(BooksAuthor record){
        return booksAuthorMapper.deleteByCondition(record);
    }

}
